<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
	</head>
	<body>
		
		<?php
            	include($_SERVER['DOCUMENT_ROOT'] ."/includes/db.php");
            	$docroot = $_SERVER['DOCUMENT_ROOT'];
            	dbConnect('kar_web1');
            	
           	//$query = "SELECT * INTO OUTFILE './backup/cats.sql'
            	//FROM cats";
            	$query = "SELECT * INTO OUTFILE '".$docroot."/admin/backup/cats.sql' FROM cats";
            	$result = mysql_query($query) or
			die("Error doing backup. ".mysql_error());
            	
           	$query = "SELECT * INTO OUTFILE './backup/documents.sql' 
           	FROM documents";
            	$result = mysql_query($query); //or
            		//die("Error doing backup. ".mysql_error());
            	
           	$query = "SELECT * INTO OUTFILE './backup/dogs.sql'
            	FROM dogs";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/eventFunctions.sql'
            	FROM eventFunctions";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/eventPets.sql'
            	FROM eventPets";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/events.sql'
            	FROM events";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/eventVolunteers.sql'
            	FROM eventVolunteers";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/locations.sql'
            	FROM locations";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/officers.sql'
            	FROM officers";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/vetExpenses.sql'
            	FROM vetExpenses";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/vets.sql'
            	FROM vets";
            	$result = mysql_query($query);
            	
           	$query = "SELECT * INTO OUTFILE './backup/volunteers.sql'
            	FROM volunteers";
            	$result = mysql_query($query);
             	?>
	</body>
</html>
